package com.mooc.yohoshop.ui.login;

import com.mooc.yohoshop.ApiService;
import com.mooc.yohoshop.entity.BaseEntity;
import com.mooc.yohoshop.network.BaseRepository;
import com.mooc.yohoshop.network.HttpFactory;
import com.mooc.yohoshop.network.HttpType;

import java.util.HashMap;

import io.reactivex.Observable;

public class LoginRepo extends BaseRepository {

    Observable<BaseEntity> requestUserValues(HashMap<String,Object> map){
        return convertObservable(HttpFactory.factory(HttpType.UPLOADTYPE).getRetrofit()
                .create(ApiService.class).requestValues(createBody(map)));
    }

    Observable<BaseEntity> requestLoginNP(HashMap<String,Object> map){
        return convertObservable(HttpFactory.factory(HttpType.UPLOADTYPE).getRetrofit()
                .create(ApiService.class).requestNamePwd(createBody(map)));
    }


}
